﻿#include <QMutex>
#include "GlobalData.h"


QMutex g_GlobalDataMutex;

CGlobalData* CGlobalData::getInstance()
{
	static CGlobalData* pInstance = nullptr;
	
	g_GlobalDataMutex.lock();
	if (nullptr == pInstance)
	{
		pInstance = new CGlobalData();
	}
	g_GlobalDataMutex.unlock();

	return pInstance;
}

CGlobalData::CGlobalData()
{
	m_nTestReportUid = 0;

}

CGlobalData::~CGlobalData()
{

}

uint32_t CGlobalData::getTestReportUid() const
{
	return m_nTestReportUid;
}

void CGlobalData::setTestReportUid(uint32_t uid)
{
	m_nTestReportUid = uid;
}

void CGlobalData::clear()
{
	m_nTestReportUid = 0;
}
